<template>
  <div class="content">
    <header>
      <ul><li @click="back()" class="grey"><img class="back-icon" src="~assets/img/icon_l@2x.png" alt=""> 返回</li><li><h2 style="font-size:16px">{{$parent.title}}</h2></li><li></li></ul>
    </header>
    <ul class="setting">
      <router-link to='/mobile_set' tag='li'>手机号设置<img class="more-icon" src="~assets/img/icon-r@2x.png" alt="手机号设置"></router-link>
      <router-link to='/payment_set' tag='li'>支付设置<img class="more-icon"  src="~assets/img/icon-r@2x.png" alt="支付设置"></router-link>
      <router-link to='/basic_info' tag='li'>基本信息<img class="more-icon"  src="~assets/img/icon-r@2x.png" alt="基本信息"></router-link>
      <router-link to='/present_set' tag='li'>提现设置<img class="more-icon"  src="~assets/img/icon-r@2x.png" alt="提现设置"></router-link>
      <router-link to='/address_management' tag='li'>地址管理<img class="more-icon"  src="~assets/img/icon-r@2x.png" alt="提现设置"></router-link>
      <li @click="exit_login()">退出登录<img class="more-icon"  src="~assets/img/icon-r@2x.png" alt="退出登录"></li>
    </ul>
  </div>
</template>

<script>
import { MessageBox } from 'mint-ui'
export default {
  name: 'HelloWorld',
  data () {
    return {
    }
  },
  mounted () {
  },
  methods: {
    exit_login () {
      MessageBox.confirm('你确认退出当前账户信息?').then(action => {
        this.$cookie.delete('uid')
        this.$cookie.delete('token')
        this.$router.push('/login')
      }).catch((reason) => {
      })
    },
    back () {
        this.$router.push('/user')
      }
  }
}
</script>
<style scoped lang='scss'>
  .setting{
    width: 100%;
    height:auto;
    padding: 0 15px 0 15px;
    background: #fff;
    margin-top: 10px;
    li{
      width: 100%;
      height:54px;
      line-height: 54px;
      color: #000;
      border-bottom:1px solid #E5E5E5;
      &:last-child{
        border:none
      }
    }
  }
</style>
